package cn.tac.test.spring.autowired.bean.impl;

import cn.tac.test.spring.autowired.annotation.NoBean;
import cn.tac.test.spring.autowired.bean.Enemy;
import cn.tac.test.spring.autowired.bean.GreeceHero;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author : tac
 * @date : 15/04/2017
 */

/**
 * this class will not register to spring context
 */

@NoBean
public class Hercules implements GreeceHero {
    private Logger logger = LoggerFactory.getLogger(Achilles.class);

    private final String HERO_NAME = "Hercules";

    private Enemy enemy;

    public Hercules(Enemy enemy){
        this.enemy = enemy;
    }

    public void killEnemy() {
        logger.info(HERO_NAME + " kills " + enemy.getNum() + " enemies");
    }
}
